package com.codemonkey.lq.qd.extend.impl;

import com.codemonkey.lq.qd.builder.BaseBuilder;
import com.codemonkey.lq.qd.builder.BuilderEventListener;
import com.codemonkey.lq.qd.builder.xml.XMLSConfigBuilder;
import com.codemonkey.lq.qd.facotry.config.SConfiguration;

public class SdAutoRefreshEventListener implements BuilderEventListener {

	@Override
	public void builded(BaseBuilder builder, Object currentElement, SConfiguration sc) {
		if (builder instanceof XMLSConfigBuilder) {
			SConfiguration sConfig = (SConfiguration) currentElement;
			SdAutoRefresher sdRefresh = new SdAutoRefresher(sConfig);
			new Thread(sdRefresh).start();
		}

	}
}
